package com.wzh.houseEs.feign;

import com.wzh.common.utils.R;
import com.wzh.houseEs.vo.RentHouseVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author WZH
 * @title: HouseFeign
 * @projectName find_house
 * @description:
 * @date 2022/3/24
 */
@FeignClient("house")
public interface HouseFeign {

    /**
     * 查询添加es
     */
    @RequestMapping("/house/newhouse/esNewList")
    R esNewList();
    @RequestMapping("/house/renthouse/MyRentHouseList")
    List<RentHouseVo> MyRentHouseList(@RequestParam("userId")Integer userId);

    //根据id查找房子
    @RequestMapping("/house/renthouse/info/{houseId}")
    R info(@PathVariable("houseId") Integer houseId);

    @RequestMapping("/house/renthouse/updateZd")
    R updateZd(@RequestBody RentHouseVo rentHouseVo);

    @RequestMapping("/house/renthouse/selectBySort")
    List<RentHouseVo> selectBySort();

    @RequestMapping("/house/renthouse/MyRentHouseList2")
    List<RentHouseVo> MyRentHouseList2();

}
